/* import request from '@/utils/request'

// 查询权限列表
export function getPermissionListApi() {
  return request({
    url: '/sys/permission',
    method: 'get'
  })
}
// 查询单个权限
export function getPermissionInfoApi(id) {
  return request({
    url: '/sys/permission/' + id,
    method: 'get'
  })
}

// 添加权限
export function addPermissionApi(data) {
  return request({
    method: 'post',
    url: '/sys/permission',
    data
  })
}

// 修改权限
export function editPermissionApi(data) {
  return request({
    method: 'put',
    url: '/sys/permission/' + data.id,
    data
  })
}

// 删除权限
export function delPermissionApi(id) {
  return request({
    method: 'delete',
    url: '/sys/permission/' + id

  })
} */

import request from '@/utils/request'

/** *
 * 获取权限列表
 * **/

export function getPermissionList() {
  return request({
    url: '/sys/permission'
  })
}

// 添加
export const addPermissionList = (data) => {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
// 查询单个
export const getPermissionInfoApi = (id) => {
  return request({
    url: '/sys/permission/' + id,
    method: 'get'
  })
}

// 修改角色
export const editPermissionApi = (data) => {
  return request({
    url: '/sys/permission/' + data.id,
    method: 'put',
    data // 查询参数
  })
}
// 删除角色
export const delPermissionApi = (id) => {
  return request({
    url: '/sys/permission/' + id,
    method: 'delete'
  })
}
